<?php
class instituicoes extends PC4_Controlador_APP_CRUD_CT {
	
	function __construct() {
		parent::__construct();
		$modelo = new Abstrato('instituicoes', array('cnpj' => 'repetida'));
		$this->init($modelo, 'admin/instituicoes');
	}
	protected function trataForm($id = 0) {
		$campos = parent::trataForm($id);
		$campos['slug'] = $this->modelo->slug($campos['cnpj'], '0', 'cnpj');
		return $campos;
	}
	
	function edita($id) {
		parent::edita($id, 'slug');
	}

	function trataEdita($slug) {
		parent::trataEdita($slug, 'slug');
	}
	
	function trataApaga($slug) {
		parent::trataApaga($slug, 'slug');
	}
	
}